{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "pandas.Panel(data, items, major_axis, minor_axis, dtype, copy)\n",
    "\n",
    "参数名称|描述说明\n",
    ":-|:-\n",
    "data|输入数据，可以是 ndarray，Series，列表，字典，或者 DataFrame。\n",
    "items|axis=0\n",
    "major_axis|axis=1\n",
    "minor_axis|axis=2\n",
    "dtype|每一列的数据类型。\n",
    "copy|默认为 False，表示是否复制数据。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.panel.Panel'>\n",
      "Dimensions: 3 (items) x 3 (major_axis) x 3 (minor_axis)\n",
      "Items axis: 0 to 2\n",
      "Major_axis axis: 0 to 2\n",
      "Minor_axis axis: 0 to 2\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Progrram Files\\anaconda\\lib\\site-packages\\IPython\\core\\interactiveshell.py:2961: FutureWarning: \n",
      "Panel is deprecated and will be removed in a future version.\n",
      "The recommended way to represent these types of 3-dimensional data are with a MultiIndex on a DataFrame, via the Panel.to_frame() method\n",
      "Alternatively, you can use the xarray package http://xarray.pydata.org/en/stable/.\n",
      "Pandas provides a `.to_xarray()` method to help automate this conversion.\n",
      "\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n"
     ]
    }
   ],
   "source": [
    "# 创建Panel对象\n",
    "panel = pd.Panel(np.random.rand(27).reshape(3,3,3),)\n",
    "print(panel)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# C++ Panel 对象在未来版本会被移除，爷不学了。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
